package com.googlecode.alogwe.sprockit.unused;

import java.io.IOException;
import java.io.PipedReader;
import java.io.PipedWriter;

public class Console {

	private HistoryList	history;
	private PipedWriter out;

	public Console() {
		history = new HistoryList();
		out = new PipedWriter();
	}

	public HistoryList getHistory() {
		return history;
	}
	
	public PipedReader getReader() throws IOException {
		PipedReader pr = new PipedReader();
		pr.connect(out);
		return pr;
	}

	public void write(String s) {
		try {
			out.write(s);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
